Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: security handlers #11

Merged
merged 1 commit into from
Feb 21, 2024
Merged

feat: security handlers #11

merged 1 commit into from
Feb 21, 2024

Conversation

meghein
Copy link
Contributor

@meghein meghein commented Jan 12, 2024

Summary

Test Plan

  • Run tests
  • Run through the README to get the example app running
  • Send a request to /foo with a bearer token to confirm the route responds with { userId: 123 }
  • Try without a bearer token (or change any part of the security chain) to confirm the route fails permissions

TODO:

  • update default security handler (makeSecurityHandler) with reasonable defaults for it's consumers

@eadmundo eadmundo self-requested a review January 15, 2024 18:01
@eadmundo eadmundo self-assigned this Jan 15, 2024
Copy link
Member

@eadmundo eadmundo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run the example and use the logged out test request, I get this error:

{
    "error": "Unauthorized",
    "message": "None of the security schemes (bearerAuth) successfully authenticated this request.",
    "statusCode": 401
}

README.md Outdated Show resolved Hide resolved
@meghein
Copy link
Contributor Author

meghein commented Jan 15, 2024

When I run the example and use the logged out test request, I get this error:

{
    "error": "Unauthorized",
    "message": "None of the security schemes (bearerAuth) successfully authenticated this request.",
    "statusCode": 401
}

@eadmundo - I just ran the example locally and I'm not getting this error.. maybe sync up about this when you have time?

@meghein meghein force-pushed the feat/security-handlers branch 3 times, most recently from f8fbbf9 to 5013890 Compare January 22, 2024 23:10
@meghein meghein changed the base branch from main to chore/plugin-structure January 22, 2024 23:11
@meghein meghein force-pushed the feat/security-handlers branch 3 times, most recently from ba7a2d2 to d74dd6d Compare January 23, 2024 01:33
@meghein meghein changed the base branch from chore/plugin-structure to main February 21, 2024 17:32
@meghein meghein merged commit 4739780 into main Feb 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants